import { LayoutComponent } from '../layout/layout.component';
import { LayoutFullScreenComponent } from '../layout/fullscreen/fullscreen.component';
import { LoginComponent } from './pages/login/login.component';
import { LockComponent } from './pages/lock/lock.component';
import { RegisterComponent } from './pages/register/register.component';
import { ForgetComponent } from './pages/forget/forget.component';
import { MaintenanceComponent } from './pages/maintenance/maintenance.component';
import { Page404Component } from './pages/404/404.component';
import { Page500Component } from './pages/500/500.component';
import { DashboardV1Component } from './dashboard/v1/v1.component';
import { DashboardAnalysisComponent } from './dashboard/analysis/analysis.component';
import { DashboardMonitorComponent } from './dashboard/monitor/monitor.component';
import { DashboardWorkplaceComponent } from './dashboard/workplace/workplace.component';
import { IndexComponent } from './index/index.component';

export const routes = [
    {
        path: '',
        component: LayoutComponent,
        children: [
            { path: '', redirectTo: 'index', pathMatch: 'full' },
            { path: 'home', loadChildren: './home/home.module#HomeModule', data: { translate: 'dashboard_workplace' } },
            { path: 'educational', loadChildren: './educational/educational.module#EducationalModule', data: { translate: 'dashboard_workplace' } },
            { path: 'announcement', loadChildren: './announcement/announcement.module#AnnouncementModule', data: { translate: 'dashboard_workplace' } },
            { path: 'management', loadChildren: './management/management.module#ManagementModule', data: { translate: 'dashboard_workplace' } },
            { path: 'cloud', loadChildren: './cloud/cloud.module#CloudModule', data: { translate: 'dashboard_workplace' } },
            { path: 'course', loadChildren: './course/course.module#CourseModule', data: { translate: 'dashboard_workplace' } },
            { path: 'schcloud', loadChildren: './schcloud/schcloud.module#SchcloudModule', data: { translate: 'dashboard_workplace' } },
            { path: 'schcrouse', loadChildren: './schcrouse/schcrouse.module#SchcrouseModule', data: { translate: 'dashboard_workplace' } },

            { path: 'teacrouse', loadChildren: './teacrouse/teacrouse.module#TeacrouseModule', data: { translate: 'dashboard_workplace' } },

            { path: 'kecheng', loadChildren: './tables/tables.module#TablesModule', data: { translate: 'dashboard_workplace' } },
            { path: 'index', loadChildren: './index/index.module#IndexModule', data: { translate: 'dashboard_workplace' } },
            { path: 'jiaowu', loadChildren: './tables/tables.module#TablesModule', data: { translate: 'dashboard_workplace' } },
            { path: 'flow', loadChildren: './flows/flow.module#FlowModule', data: { translate: 'dashboard_workplace' } },
            { path: 'xiangmu', loadChildren: './project/project.module#ProjectModule', data: { translate: 'dashboard_workplace' } },
            { path: 'statistics', loadChildren: './statistics/statistics.module#StatisticsModule', data: { translate: 'dashboard_workplace' } },
            { path: 'xtgl', loadChildren: './xtgl/xtgl.module#XtglModule', data: { translate: 'dashboard_workplace' } },
            { path: 'analysis', loadChildren: './analysis/analysis.module#AnalysisModule' },
            { path: 'widgets', loadChildren: './widgets/widgets.module#WidgetsModule' },
            { path: 'elements', loadChildren: './elements/elements.module#ElementsModule' },
            { path: 'forms', loadChildren: './forms/forms.module#FormsModule' },
            { path: 'charts', loadChildren: './charts/charts.module#ChartsModule' },
            { path: 'tables', loadChildren: './tables/tables.module#TablesModule' },
            { path: 'maps', loadChildren: './maps/maps.module#MapsModule' },
            { path: 'logics', loadChildren: './logics/logics.module#LogicsModule' },
            { path: 'extras', loadChildren: './extras/extras.module#ExtrasModule' },
            { path: 'pro', loadChildren: './pro/pro.module#ProModule' }
        ]
    },
    // 全屏布局
    {
        path: 'preview',
        component: LayoutFullScreenComponent,
        children: [
            { path: '', loadChildren: './preview/preview.module#PreviewModule' }
        ]
    },
    // {
    //     path: 'preview',
    //     component: LayoutFullScreenComponent,
    //     children: [
    //         { path: '', loadChildren: './data-v/data-v.module#DataVModule' }
    //     ]
    // },
    // pro 单页
    // 单页不包裹Layout
    { path: 'register', component: RegisterComponent, data: { translate: 'register' } },
    { path: 'login', component: LoginComponent, data: { title: 'login' } },
    { path: 'forget', component: ForgetComponent, data: { translate: 'forget' } },
    { path: 'lock', component: LockComponent, data: { translate: 'lock' } },
    { path: 'maintenance', component: MaintenanceComponent },
    { path: '404', component: Page404Component },
    { path: '500', component: Page500Component },
    { path: '**', redirectTo: 'index' }
];
